exports.path = '/example/selectInto';
exports.title = '任务数量';
exports.pool = 'task';

exports.sqltext = `
begin
  select count(*) into :taskCount
  from tf_mbss_tasks
  where CREATE_TIME > trunc(sysdate, nvl(:unit, 'year'));
end;
`;

exports.bindObj = {
  taskCount: {
    dir: oracledb.BIND_OUT,
  },
};

exports.request = {
  unit: 'day',
};

exports.outConverter = sqlresult => ({
  taskCount: sqlresult.outBinds.taskCount,
});
